<template>
	<view class="page">
		<nav-bar title="我的" />

		<van-image v-if="userInfo.avatar" class="avatar" round width="300rpx" height="300rpx" :src="userInfo.avatar" />
		<van-image v-else class="avatar" round width="300rpx" height="300rpx" src="/assets/images/avatar.jpeg" />
		<view class="text">{{ userInfo.name }}</view>
		<view class="text">{{ userInfo.dept }}</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';

	import store from '@/store'

	const userInfo = store.getters.GET_USER_INFO.sysUser;
	console.log(userInfo)
</script>

<style lang="scss" scoped>
	.page {
		padding-bottom: 50rpx;
		text-align: center;
		background-color: #fff;
		font-size: 28rpx;

		.avatar {
			margin: 50rpx 0 20rpx;
		}

		.text {
			padding: 20rpx;
		}
	}
</style>